#! /bin/sh
set -x

rm -rf admin
mkdir admin

if [ -e /usr/bin/glibtoolize ] ; then
    glibtoolize --force
elif [ -e /usr/bin/libtoolize ] ; then
    libtoolize --force
elif [ -e /usr/local/bin/libtoolize ] ; then
    libtoolize --force
else
   echo "ERROR: I cannot find libtoolize or glibtoolize!"
   exit 1
fi

if [ -e /usr/local/share/aclocal ] ; then
   aclocal -I /usr/local/share/aclocal
else
   aclocal -I /usr/share/aclocal
fi
autoheader
automake --gnu --add-missing --copy
autoconf
